#include "GUI.h"
#include "GUIElements/Console.h"
#include "../InputManager.h"

CGUI::CGUI()
{
	pLogRelease << "GUI class created..." << endl;
}

CGUI::~CGUI()
{
	GUIElements.DeleteListNodes();
}

s32 CGUI::Update()
{
	if (InputManager->GetKeyState(KEY_1)->Pushed)
	{
		CreateDefaultConsole();
	}
}

IConsole *CGUI::CreateDefaultConsole()
{
	CConsole *con = new CConsole();
	con->SetName("DefaultConsole");
	con->SetTitle("Console for commands");
	GUIElements.push_back(con);
	return con;
}
